﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Suzsoft.Smart.EntityCore;
using System.Runtime.Serialization;
using ESOL.Common.Schema;
using System.Data;
namespace ESOL.Common.Entity
{
    [DataContract]
    [Serializable]
    public partial class BptBlueprintChangesItemEntity : EntityBase
    {
        public BptBlueprintChangesItemTable TableSchema
        {
            get
            {
                return BptBlueprintChangesItemTable.Current;
            }
        }

        public BptBlueprintChangesItemEntity()
        {

        }

        public BptBlueprintChangesItemEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ChangesId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_ID"]));
            this.ChangesCode = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_CODE"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.Remarks = Convert.ToString(CommonFunctions.ToObject(dr["REMARKS"]));
            this.ChangeType = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_TYPE"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
        }

        public BptBlueprintChangesItemEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ChangesId = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_ID"]));
            this.ChangesCode = Convert.ToString(CommonFunctions.ToObject(dr["CHANGES_CODE"]));
            this.BlueprintId = Convert.ToString(CommonFunctions.ToObject(dr["BLUEPRINT_ID"]));
            this.Remarks = Convert.ToString(CommonFunctions.ToObject(dr["REMARKS"]));
            this.ChangeType = Convert.ToString(CommonFunctions.ToObject(dr["CHANGE_TYPE"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.ProductCode = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_CODE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BptBlueprintChangesItemTable.Current;
            }
        }

        #region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_ID)); }
            set { SetData(BptBlueprintChangesItemTable.C_ID, value); }
        }

        [DataMember]
        public string ChangesId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_CHANGES_ID)); }
            set { SetData(BptBlueprintChangesItemTable.C_CHANGES_ID, value); }
        }

        [DataMember]
        public string ChangesCode
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_CHANGES_CODE)); }
            set { SetData(BptBlueprintChangesItemTable.C_CHANGES_CODE, value); }
        }

        [DataMember]
        public string BlueprintId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_BLUEPRINT_ID)); }
            set { SetData(BptBlueprintChangesItemTable.C_BLUEPRINT_ID, value); }
        }

        [DataMember]
        public string Remarks
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_REMARKS)); }
            set { SetData(BptBlueprintChangesItemTable.C_REMARKS, value); }
        }

        [DataMember]
        public string ChangeType
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_CHANGE_TYPE)); }
            set { SetData(BptBlueprintChangesItemTable.C_CHANGE_TYPE, value); }
        }

        [DataMember]
        public string PlanOrderItemId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_PLAN_ORDER_ITEM_ID)); }
            set { SetData(BptBlueprintChangesItemTable.C_PLAN_ORDER_ITEM_ID, value); }
        }

        [DataMember]
        public string ProductId
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_PRODUCT_ID)); }
            set { SetData(BptBlueprintChangesItemTable.C_PRODUCT_ID, value); }
        }

        [DataMember]
        public string ProductCode
        {
            get { return Convert.ToString(GetData(BptBlueprintChangesItemTable.C_PRODUCT_CODE)); }
            set { SetData(BptBlueprintChangesItemTable.C_PRODUCT_CODE, value); }
        }

        #endregion
    }
}
